package com.atguigu.gmall.item.client;

import com.atguigu.gmall.item.client.degrade.ItemDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.ArrayList;
import java.util.Map;

@FeignClient(value = "service-item", fallback = ItemDegradeFeignClient.class)
@Component
public interface ItemFeignClient {

    //获取商品页面详情
    @GetMapping("/api/item/{skuId}")
    Map getItem(@PathVariable("skuId") Long skuId);

}
